﻿Public Partial Class exForms1
    Inherits Pagebase

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        '
        Dim jc As New JQCommands(Me.J)
        'GUARDAR SOLO 
        jc.AddButton("guardar", "guardar", JQIcons.ui_icon_circle_check, Me.Form)
        'GUARDAR CON CONFIRMACION
        Jas.MakeDialogConfirm(Me.Panel1.ClientID, "No", JQUtils.Dialog.this_close, "Si", JQUtils.Form.Post(Form))
        jc.AddButton("guardar2", "", JQIcons.ui_icon_disk, JQUtils.Dialog.this_open("#" & Me.Panel1.ClientID))
        'OTROS COMANDOS
        jc.AddButton("volver", "volver", JQIcons.ui_icon_circle_close, Me.Form)
        'OTROS COMANDOS
        jc.AddButton("probar", "probar", JQIcons.ui_icon_newwin, Me.Form)
        '
        Dim command As String = Me.Request.Params("command")
        '
        If Not command Is Nothing Then
            Select Case command
                Case "guardar"
                    ' DO guardar
                    jc.SetMessage("Este es mi mensaje")
                Case "guardar2"
                    ' DO guardar
                    jc.SetMessage("El mensaje de dialogo se confirmó correctamente!")
                Case "volver"
                    ' DO volver
                    jc.SetInfo("Debe validar el dato")
                Case "probar"
                    ' DO PROBAR
                    jc.SetError("error !!!!!!!!!!")
            End Select
        End If
        '
        'Throw New HttpException( 404, "Article not found")
        '
        Exit Sub
    End Sub

End Class